package com.xiaoran.RMQ_1.test8_over_channel;

import com.rabbitmq.client.CancelCallback;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.DeliverCallback;
import com.xiaoran.RMQ_1.utlis.RabbitMqUtils;

public class Over_channel_Conmuner_2 {
    public static final String dead_Exchange="dead_Exchange";
    public static final String  dead_queue="dead_queue";
    public static void main(String args[]) throws  Exception{
        Channel channel= RabbitMqUtils.getChannel();
        DeliverCallback deliverCallback=( consumerTag,  message)->{
            System.out.println("_Conmuner_2收到的死信队列是"+new String(message.getBody(),"UTF-8"));
        };
        CancelCallback cancelCallback=consumerTag->{
        };
        channel.basicConsume(dead_queue,true,deliverCallback,cancelCallback);
    }
}
